from django.urls import path 
from . import views # 导入视图 
app_name = 'blog' 
urlpatterns = [ 
  path('', views.post_list, name='post_list'), # 当浏览器地址栏的路由是 /blog 
  path('<int:year>/<int:month>/<int:day>/<slug:post>/',
        views.post_detail, name='post_detail'),
  # 增加分享文章路由，使用post_share视图处理对应请求 
  path('<int:post_id>/share/', views.post_share, name='post_share'),
  path('tag/<slug:tag_slug>/', views.post_list, name='post_list_by_tag'),
   path('search/', views.post_search, name='post_search')
]